package com.ruoyi.bus.springutil;

import com.ruoyi.bus.service.IWitBusLocationService;
import com.ruoyi.bus.service.IWitBusService;
import com.ruoyi.bus.service.IWitRouteService;
import com.ruoyi.bus.service.IWitSiteService;

/**
 * @Description
 * @Author caiyanshan
 * @Date 2021/4/28 15:50
 * @Param
 * @Return
 */
public class SpringUtils {
  
  private static IWitBusLocationService witBusLocationService;
  
  private static IWitRouteService witRouteService;
  
  private static IWitSiteService witSiteService;
  
  private static IWitBusService witBusService;
  
  public static IWitBusService getBusService(){
    if(witBusService == null){
      witBusService = com.ruoyi.common.utils.spring.SpringUtils.getBean(IWitBusService.class);
    }
    return witBusService;
  }
  
  public static IWitRouteService getRouteService(){
    if(witRouteService == null){
      witRouteService = com.ruoyi.common.utils.spring.SpringUtils.getBean(IWitRouteService.class);
    }
    return witRouteService;
  }
  
  public static IWitBusLocationService getLocationService(){
    if(witBusLocationService == null){
      witBusLocationService = com.ruoyi.common.utils.spring.SpringUtils.getBean(IWitBusLocationService.class);
    }
    return witBusLocationService;
  }
  
  public static IWitSiteService getWitSiteService(){
    if(witSiteService == null){
      witSiteService = com.ruoyi.common.utils.spring.SpringUtils.getBean(IWitSiteService.class);
    }
    return witSiteService;
  }
}
